/*
 * @Description:
 * @Version: 2.0
 * @Author: Mason
 * @Date: 2023-10-14 16:13:01
 * @LastEditors: Mason
 * @LastEditTime: 2023-10-18 22:37:53
 */
package router

import (
	"net/http"

	"gitee.com/cy1113/credits/handler"
	"github.com/gin-gonic/gin"
)

func InitRouter(c *gin.Engine) {

	// ping
	c.GET("/ping", func(ctx *gin.Context) {
		ctx.String(http.StatusOK, "success")
	})

	// user
	c.POST("/user", handler.User{}.Create)
	c.GET("/user/detail", handler.User{}.FindOne)

}
